package ren.steve.system.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ren.steve.model.system.bean.SystemLoginLog;
import ren.steve.system.mapper.SystemLoginLogMapper;
import ren.steve.system.service.LoginLogService;

/**
 * @Author: CIS-T-13 Liu GuoJia
 * @Description:
 * @Date: Created in 2024/2/8 15:29
 */

@Service
public class LoginLogServiceImpl implements LoginLogService {

  @Autowired
  SystemLoginLogMapper systemLoginLogMapper;

  @Override
  public void recordLoginLog(String user, String ip, String message, String status) {
    SystemLoginLog systemLoginLog = new SystemLoginLog();
    systemLoginLog.setUser(user);
    systemLoginLog.setIp(ip);
    systemLoginLog.setMessage(message);
    systemLoginLog.setStatus(status);
    systemLoginLogMapper.insert(systemLoginLog);
  }
}
